import request from '@/utils/request'

// 添加维保工单
export function miOrderAdd(data) {
  return request({
    url: '/maintenance/miOrder/add',
    method: 'post',
    params: {},
    data,
    port: { ENV_PORT: 8005 },
    ajaxType2: 'reqPost'

  })
}

// 删除维保工单
export function miOrderDelete(orderId) {
  return request({
    url: '/maintenance/miOrder/delete',
    method: 'delete',
    params: { orderId },
    port: { ENV_PORT: 8005 },
    ajaxType2: 'reqDelete'

  })
}

// 查询维保工单列表
export function miOrderQueryList(name, pageIndex, pageSize, type) {
  return request({
    url: '/maintenance/miOrder/queryList',
    method: 'get',
    params: { name, pageIndex, pageSize, type },
    port: { ENV_PORT: 8005 },
    ajaxType2: 'reqGet'

  })
}

// 修改维保工单
export function miOrderUpdate(data) {
  return request({
    url: '/maintenance/miOrder/update',
    method: 'put',
    params: {},
    data,
    port: { ENV_PORT: 8005 },
    ajaxType2: 'reqPut'
  })
}

